package com.stork.sms.activity;

import com.stork.sms.R;
import com.stork.sms.R.id;
import com.stork.sms.R.layout;
import com.stork.sms.R.menu;

import android.app.ActionBar;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.webkit.WebView;


public class Webview extends Activity {

	private WebView wb;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_webview);
		
		ActionBar ab=getActionBar();
		ab.setDisplayHomeAsUpEnabled(true);
		ab.setTitle("WebView");
		
		wb=(WebView)findViewById(R.id.website);
		wb.getSettings().setJavaScriptEnabled(true);
		wb.loadUrl("http://www.storksystem.com");
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.webview, menu);
		return true;
	}
	
	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		// TODO Auto-generated method stub
		switch(item.getItemId())
		{
		
		case android.R.id.home:
			super.onBackPressed();
			return true;
			
		case R.id.action_logout:
			
			Intent l=new Intent(Webview.this, Login.class);
			startActivity(l);
			return true;
			
		case R.id.action_contactus:
			
			Intent c=new Intent(Webview.this, Contactus.class);
			startActivity(c);
			return true;
			
		}
			
			return super.onOptionsItemSelected(item);			
		}

}